package com.mentalhealthplatform.studentV3.dto;


import lombok.Getter;
import lombok.Setter;

/**
 * @author Pear
 */
@Setter
@Getter
public class TestDTOV3 {

    // Getter 和 Setter 方法
    private Integer id;
    private String topic;
    private Boolean always;
    private Boolean often;
    private Boolean sometimes;
    private Boolean hardly;
    private Boolean none;
    private int totalScore;

    // 包含一个字符串方法，用于帮助显示所有选项的状态
    public String getOptionsSummary() {
        StringBuilder summary = new StringBuilder("选项：");
        if (Boolean.TRUE.equals(always)) {
            summary.append("总是 ");
        }
        if (Boolean.TRUE.equals(often)) {
            summary.append("经常 ");
        }
        if (Boolean.TRUE.equals(sometimes)) {
            summary.append("有时候 ");
        }
        if (Boolean.TRUE.equals(hardly)) {
            summary.append("很少 ");
        }
        if (Boolean.TRUE.equals(none)) {
            summary.append("从不 ");
        }
        return summary.toString();
    }

}
